package com.wxtl.entity;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.struts2.json.annotations.JSON;

/**
 * Product entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "product", catalog = "upweb")
public class Product implements java.io.Serializable {

	// Fields

	private Integer productId;
	private String code;
	private String name;
	private String exVersion;
	private Timestamp exTime;
	private String newVersion;
	private String trialPath;
	private String downPath;
	private String description;
	private String shortCode;

	// Constructors

	/** default constructor */
	public Product() {
	}

	/** full constructor */
	public Product(String code, String name, String exVersion,
			Timestamp exTime, String newVersion, String trialPath,
			String downPath, String description,String shortCode) {
		this.code = code;
		this.name = name;
		this.exVersion = exVersion;
		this.exTime = exTime;
		this.newVersion = newVersion;
		this.trialPath = trialPath;
		this.downPath = downPath;
		this.description = description;
		this.shortCode = shortCode;
	}

	@Column(name = "shortCode", length = 10)
	public String getShortCode() {
		return shortCode;
	}

	public void setShortCode(String shortCode) {
		this.shortCode = shortCode;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "productId", unique = true, nullable = false)
	public Integer getProductId() {
		return this.productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	@Column(name = "code", length = 20)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "name", length = 50)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "exVersion", length = 20)
	public String getExVersion() {
		return this.exVersion;
	}

	public void setExVersion(String exVersion) {
		this.exVersion = exVersion;
	}

	@JSON(format="yyyy-MM-dd HH:mm:ss")
	@Column(name = "exTime", length = 19)
	public Timestamp getExTime() {
		return this.exTime;
	}

	public void setExTime(Timestamp exTime) {
		this.exTime = exTime;
	}

	@Column(name = "newVersion", length = 20)
	public String getNewVersion() {
		return this.newVersion;
	}

	public void setNewVersion(String newVersion) {
		this.newVersion = newVersion;
	}

	@Column(name = "trialPath", length = 100)
	public String getTrialPath() {
		return this.trialPath;
	}

	public void setTrialPath(String trialPath) {
		this.trialPath = trialPath;
	}

	@Column(name = "downPath", length = 100)
	public String getDownPath() {
		return this.downPath;
	}

	public void setDownPath(String downPath) {
		this.downPath = downPath;
	}

	@Column(name = "description", length = 1000)
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}